﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class PriorityQueue
{
    static void Main(string[] args)
    {
        PriorityQueue<int> pq = new PriorityQueue<int>();
        pq.Enqueue(4);
        pq.Enqueue(1);
        pq.Enqueue(6);
        Console.WriteLine(pq.Dequeue());
        Console.WriteLine(pq.Peek());
        foreach (int el in pq)
        {
            Console.WriteLine(el);
        }
        pq.Enqueue(10);
        PriorityQueue<int> pq2 = new PriorityQueue<int>(pq);
        foreach (int el in pq2)
        {
            Console.WriteLine(el);
        }
    }
}

